#!/bin/bash


# 启动注册中心
currentPath= pwd
#echo ${currentPath}
cd '/media/liangqq/Win 10 Pro x64/Users/Administrator/Desktop/lqq/testJars/'

appName="eureka-server-1.0.0.jar"
echo ${appName}
killShell=/home/liangqq/gitee/shellDemo/yq/KillProgram.sh
#echo ${currentPath}
#exec ${currentPath}/KillProgram.sh $appName
#获取当前的路径？
chmod +x $killShell
fork $killShell $appName

nohup java -jar ${appName} &

for x in $(seq 1 10)
do
    echo $x
    sleep 1s
done
echo 'eureka started'


#启动网关 gateway-0.0.1-SNAPSHOT.jar
appName=gateway-0.0.1-SNAPSHOT.jar
echo $appName
fork $killShell $appName
nohup java -jar ${appName} &
##启动uaa relation-0.0.1-SNAPSHOT.jar
#appName=relation-0.0.1-SNAPSHOT.jar
#echo $appNamed
#fork $killShell $appName
#nohup java -jar ${appName} &
##启动结算中心 settlement-1.0.0-SNAPSHOT.jar
#appName=relation-0.0.1-SNAPSHOT.jar
#echo $appName
#fork $killShell $appName
#nohup java -jar ${appName} &
##启动会员中心 uaa-0.0.1-SNAPSHOT.jar
#appName=uaa-0.0.1-SNAPSHOT.jar
#echo $appName
#fork $killShell $appName
#nohup java -jar ${appName} &